#-*- Makefile -*-
#
# ${R_HOME}/src/library/splines/Makefile.win

srcdir = .
top_srcdir = ../../..

top_builddir = ../../..

pkg = splines

RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`

R_EXE = $(top_builddir)/bin/Rterm.exe --vanilla --slave

ECHO = echo
MKINSTALLDIRS = mkdir -p
INSTALL_DATA = cp
SHELL = sh
USE_NLS = yes

all:
	@$(ECHO) "building package '$(pkg)'"
	@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
	@$(MAKE) -f Makefile.win mkR mkdesc mkpo
	@if test -d src; then \
	  $(MAKE) -C src -f $(RHOME)/src/gnuwin32/MakeDll RHOME=$(RHOME) DLLNAME=$(pkg) || exit 1; \
	  mkdir -p $(top_builddir)/library/$(pkg)/libs; \
	  cp src/$(pkg).dll $(top_builddir)/library/$(pkg)/libs; \
	fi
	@$(MAKE) -f Makefile.win mklazy


include $(top_srcdir)/share/make/basepkg.mk

#	@$(MAKE) -C src -f $(RHOME)/src/gnuwin32/MakeDll RHOME=$(RHOME) DLLNAME=$(pkg) shlib-clean
